﻿using DDDDemoABP1.Payments;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace DDDDemoABP1.EntityFrameworkCore;

[ConnectionStringName(DDDDemoABP1DbProperties.ConnectionStringName)]
public class DDDDemoABP1DbContext : AbpDbContext<DDDDemoABP1DbContext>, IDDDDemoABP1DbContext
{
    /* Add DbSet for each Aggregate Root here. Example:
     * public DbSet<Question> Questions { get; set; }
     */
    public DbSet<Account> Accounts { get; set; }

    public DDDDemoABP1DbContext(DbContextOptions<DDDDemoABP1DbContext> options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureDDDDemoABP1();
    }
}
